{
  "properties" : { },
  "id" : "30732a1e6f484ddb9ac925d961c1d80f",
  "script" : null,
  "groupId" : "8f5281bc475f40c9b352658edf5fe46b",
  "name" : "流程定义查询",
  "createTime" : null,
  "updateTime" : 1744475927714,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "definition/query",
  "method" : "GET",
  "parameters" : [ {
    "name" : "page",
    "value" : null,
    "description" : null,
    "required" : true,
    "dataType" : "Integer",
    "type" : null,
    "defaultValue" : "1",
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "limit",
    "value" : null,
    "description" : null,
    "required" : true,
    "dataType" : "Integer",
    "type" : null,
    "defaultValue" : "10",
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": [\n        {\n            \"id\": \"UserReport:10:0fc4276b-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 10\n        },\n        {\n            \"id\": \"UserReport:11:187a12ce-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 11\n        },\n        {\n            \"id\": \"UserReport:12:35bd8751-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 12\n        },\n        {\n            \"id\": \"UserReport:13:ce87e894-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 13\n        },\n        {\n            \"id\": \"UserReport:14:d7d977b7-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 14\n        },\n        {\n            \"id\": \"UserReport:15:f58af04a-fa6c-11ef-be97-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 15\n        },\n        {\n            \"id\": \"UserReport:16:a24b2747-fa70-11ef-8b05-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 16\n        },\n        {\n            \"id\": \"UserReport:1:75cdaa01-fa68-11ef-973e-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 1\n        },\n        {\n            \"id\": \"UserReport:2:83e2b4a4-fa68-11ef-973e-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 2\n        },\n        {\n            \"id\": \"UserReport:3:96e223b7-fa68-11ef-973e-f4b3016ece8b\",\n            \"name\": \"用户上报\",\n            \"key\": \"UserReport\",\n            \"description\": \"用户上报领导审批\",\n            \"version\": 3\n        }\n    ]\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import 'org.activiti.engine.RepositoryService' as repositoryService;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.activiti.engine.repository.ProcessDefinitionQuery;

ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery().latestVersion();

var list = query.listPage((page-1) * limit, limit);
var resList = [];
for (item in list) {
    resList.add({
        id: item.id, name: item.name, key: item.key, description: item.description,
        version: item.version
    });
}

return resList;


